using System;
using FluentNHibernate.Mapping;
using Kollektiv.DB.NHibernate;

namespace Kollektiv.DataModel.NHibernate
{
	public class UserMap:DataObjectMap<User>
	{
        public UserMap()
            : base()
        {
            Map(x => x.Email).Not.Nullable().UniqueKey("uix_UserEmail");
            Map(x => x.FirstName).Not.Nullable();
            Map(x => x.LastName).Not.Nullable();
            References<Language>(x => x.Language).Nullable();
            Map(x => x.Certificate).Nullable().UniqueKey("uix_UserCertificate");
            Map(x => x.PasswordHash).Not.Nullable();
            Map(x => x.Verified).Not.Nullable();
        }
	}
}

